<?php
/**
 * Created by JetBrains PhpStorm.
 * User: acumen
 * Date: 11/27/12
 * Time: 9:10 AM
 * To change this template use File | Settings | File Templates.
 */
class User_Model extends CI_Model {
    function login($username, $password) {
        $this->db->select('user_username');
        $this->db->from('bh_user');
        $this->db->where('user_username = ' . "'" . $username ."'");
        $this->db->where('user_password = ' . "'" . $password . "'");
        $query = $this->db->get();
        if($query->num_rows() == 1) {
            return $query->result();
        } else {
            return false;
        }
    }
}
?>